TraceCompat

Deprecated

TraceCompat is deprecated in favor of androidx.tracing.Trace. Please use that instead.

Writes trace events to the system trace buffer. These trace events can be collected and visualized using the Systrace tool.

This tracing mechanism is independent of the method tracing mechanism offered by startMethodTracing. In particular, it enables tracing of events that occur across multiple processes.

For information about using the Systrace tool, read Overview of system tracing.

Functions

Link copied to clipboard
open fun beginAsyncSection(@NonNull methodName: String, cookie: Int)
Writes a trace message to indicate that a given section of code has begun.
Link copied to clipboard
open fun beginSection(@NonNull sectionName: String)
Writes a trace message to indicate that a given section of code has begun.
Link copied to clipboard
open fun endAsyncSection(@NonNull methodName: String, cookie: Int)
Writes a trace message to indicate that the current method has ended.
Link copied to clipboard
open fun endSection()
Writes a trace message to indicate that a given section of code has ended.
Link copied to clipboard
open fun isEnabled(): Boolean
Checks whether or not tracing is currently enabled.
Link copied to clipboard
open fun setCounter(@NonNull counterName: String, counterValue: Int)
Writes trace message to indicate the value of a given counter.